package com.aisb.gis;

import com.aisb.core.Result;
import com.aisb.core.log.LogVisit;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/gis")
public class GisController {
    private static Logger logger = LoggerFactory.getLogger(GisController.class);

    @Autowired
    GisService authService;

    @RequestMapping(value = "/index")
    @RequiresPermissions("/gis/index")
    @LogVisit("首页")
    public String index(Model model) {
        return "gis/index";
    }

    @RequestMapping(value = "/heatmap/index")
    @RequiresPermissions("/gis/heatmap/index")
    @LogVisit("热力图")
    public String heatmap(Model model) {
        return "gis/heatmap";
    }

    @RequestMapping(value = "/echarts/index")
    @RequiresPermissions("/gis/echarts/index")
    @LogVisit("图表")
    public String echarts(Model model) {
        return "gis/echarts";
    }

    @RequestMapping(value = "/map/draw/index")
    @RequiresPermissions("/gis/map/draw/index")
    @LogVisit("地图绘制")
    public String mapDraw(Model model) {
        return "gis/map_draw";
    }

    @RequestMapping(value = "/map/location/index")
    @RequiresPermissions("/gis/map/location/index")
    @LogVisit("地图定位")
    public String mapLocation(Model model) {
        return "gis/map_location";
    }


    @RequestMapping(value = "/allurf")
    @ResponseBody
    public Result allUserRoleFunc(@RequestParam Map param) {

        return null;
    }

}
